package com.c2dm.server;

import java.io.IOException;
import javax.servlet.http.*;

@SuppressWarnings("serial")
public class C2dm_serverServlet extends HttpServlet {
	public String register_id="";
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
		String message = req.getParameter("message");
	    getToken g=new getToken();
		sendMessage sm=new sendMessage();
		resp.setContentType("text/plain");
		resp.getWriter().println(sm.set(register_id, g.token(), "Test", message));
	}
	
	public void doPost(HttpServletRequest req, HttpServletResponse resp)
	throws IOException {
	register_id = req.getParameter("id");
    resp.setContentType("text/plain");
    resp.getWriter().println(register_id);
    }
}
